package co.fitstart.coach.service;

import java.util.List;
import java.util.Map;

import co.fitstart.coach.entity.courseware.BatchDietProgram;
import co.fitstart.coach.entity.courseware.MovementSearch;
import co.fitstart.entity.course.round.CourseRound;
import co.fitstart.entity.course.schedule.CourseSchedule;
import co.fitstart.entity.courseware.CoursewareTag;
import co.fitstart.entity.courseware.dietary.DietaryProgram;
import co.fitstart.entity.courseware.dietary.DietaryProgramTemplate;
import co.fitstart.entity.courseware.dietary.DietaryProgramType;
import co.fitstart.entity.courseware.exercise.ExerciseContent;
import co.fitstart.entity.courseware.fitnessgroup.BatchCourseware;
import co.fitstart.entity.courseware.fitnessgroup.BatchCoursewareType;
import co.fitstart.entity.courseware.fitnessgroup.Courseware;
import co.fitstart.entity.courseware.fitnessgroup.CoursewareMovementType;
import co.fitstart.entity.courseware.fitnessgroup.DailyCourseware;
import co.fitstart.entity.courseware.fitnessgroup.FitnessGroup;
import co.fitstart.entity.courseware.movement.Movement;

public interface CoursewareService {
    
    /**
     * 
     * @param batchId
     * @return
     */
    public BatchCourseware loadBatchCourseware(Long batchId);
    
    /**
     * 
     * @param courseRound
     * @param type
     * @return
     */
    public BatchCourseware getBatchCourseware(CourseRound courseRound, BatchCoursewareType type);
    
    /**
     * 
     * @param courseRound
     * @param type
     * @param sorting
     * @return
     */
    public BatchCourseware getBatchCourseware(CourseRound courseRound, BatchCoursewareType type, int sorting);
    
    /**
     * 
     * @param batchCourseware
     * @return
     */
    public DailyCourseware getDailyCourseware(BatchCourseware batchCourseware);
    
    /**
     * 
     * @param batchCourseware
     * @param sorting
     * @return
     */
    public DailyCourseware getDailyCourseware(BatchCourseware batchCourseware, int sorting);
    
    /**
     * 
     * @param fitnessGroupId
     * @return
     */
    public FitnessGroup loadFitnessGroup(Long fitnessGroupId);
    
    /**
     * 
     * @param tagIds
     * @return
     */
    public List<CoursewareTag> listCoursewareTag(List<Long> tagIds);
    
    /**
     * 
     * @param dailyId
     * @return
     */
    public DailyCourseware loadDailyCourseware(Long dailyId);
    
    /**
     * 
     * @param coursewareId
     * @return
     */
    public Courseware loadCourseware(Long coursewareId);
    
    /**
     * 
     * @return
     */
    public Map<String, List<DietaryProgramTemplate>> listDietaryProgramTemplate();
    
    /**
     * 
     * @param templateId
     * @return
     */
    public DietaryProgramTemplate loadDietaryProgramTemplate(Long templateId);
    
    /**
     * 
     * @param dietaryProgramId
     * @return
     */
    public DietaryProgram loadDietaryProgram(Long dietaryProgramId);
    
    /**
     * 
     * @param courseRound
     * @param fitnessGroup
     * @param tagIds
     */
    public void changeGroup(CourseRound courseRound, FitnessGroup fitnessGroup, String tagIds);
    
    /**
     * 
     * @param courseRound
     * @param fitnessGroup
     */
    public void editGroup(CourseRound courseRound, FitnessGroup fitnessGroup);
    
    /**
     * 
     * @param batchCourseware
     * @param batchDietProgram
     */
    public void saveDiets(BatchCourseware batchCourseware, BatchDietProgram batchDietProgram);
    
    /**
     * 
     * @param batchCourseware
     * @param dietaryProgramTemplate
     */
    public DietaryProgram createDiet(BatchCourseware batchCourseware, DietaryProgramTemplate dietaryProgramTemplate);
    
    /**
     * 
     * @param batchCourseware
     * @param dietaryProgramTemplate
     * @param type
     */
    public DietaryProgram createSnack(BatchCourseware batchCourseware, DietaryProgramTemplate dietaryProgramTemplate, DietaryProgramType type);
    
    /**
     * 
     * @param dietaryProgram
     * @param template
     */
    public DietaryProgram editDiet(DietaryProgram dietaryProgram, DietaryProgramTemplate template);
    
    /**
     * 
     * @param ids
     * @param names
     * @param descriptions
     */
    public void editCoursewareTags(List<Long> ids, List<String> names, List<String> descriptions);
    
    /**
     * 
     * @param dailyCourseware
     */
    public void rest(DailyCourseware dailyCourseware);
    
    /**
     * 
     * @param dailyCourseware
     * @param courseware
     * @param movementType
     */
    public void createCourseware(DailyCourseware dailyCourseware, Courseware courseware, CoursewareMovementType movementType);
    
    /**
     * 
     * @param courseSchedule
     * @param courseware
     */
//    public void createCourseware(CourseSchedule courseSchedule, Courseware courseware);
    
    /**
     * 
     * @param courseSchedule
     * @param movementIds
     */
    public void createCourseware(CourseSchedule courseSchedule, Long[] movementIds);
    
    /**
     * 
     * @param courseSchedule
     * @param name
     */
    public void createCourseware(CourseSchedule courseSchedule, String name);
    
    /**
     * 
     * @param courseSchedule
     * @param fitnessGroup
     */
    public void createCoursewareGroup(CourseSchedule courseSchedule, FitnessGroup fitnessGroup);
    
    /**
     * 
     * @param dailyCourseware
     * @param fitnessGroup
     * @param type
     */
    public void createCoursewareGroup(DailyCourseware dailyCourseware, FitnessGroup fitnessGroup, CoursewareMovementType type);
    
    /**
     * 
     * @param courseware
     */
    public void editCourseware(Courseware courseware);
    
    /**
     * 
     * @param courseware
     */
    public void deleteCourseware(Courseware courseware);
    
    /**
     * 
     * @param batchCourseware
     * @param coachTips
     */
    public void linkBatchCourseware(BatchCourseware batchCourseware, String coachTips);
    
    /**
     * 
     * @param dailyCourseware
     * @param coachTips
     */
    public void linkDailyCourseware(DailyCourseware dailyCourseware, String coachTips);
    
    /**
     * 
     * @param movementSearch
     * @return
     */
    public List<Movement> searchMovement(MovementSearch movementSearch);
    
    /**
     * list course courseware by dailyCourseware
     * @param dailyCourseware
     * @return
     */
    public List<Courseware> listCourseCourseware(DailyCourseware dailyCourseware);
    
    /**
     * 
     * @param courseSchedule
     * @param coursewareIds
     */
    public void deleteCourseware(CourseSchedule courseSchedule, Long[] coursewareIds);
    
    /**
     * 
     * @param courseSchedule
     * @return
     */
    public List<Courseware> listCourseWares(CourseSchedule courseSchedule);
    
    /**
     * 
     * @param courseSchedule
     * @return
     */
    public int getRank(CourseSchedule courseSchedule);
    
    /**
     * 
     * @param courseRound
     * @return
     */
    public List<CourseSchedule> listCourseSchedule(CourseRound courseRound);
    
    /**
     * 
     * @param courseSchedule
     * @param coursewares
     */
    public void editCourseware(CourseSchedule courseSchedule, List<Courseware> coursewares);
    
    /**
     * 
     * @param contents
     * @return
     */
    public List<Movement> listMovement(List<ExerciseContent> contents);
}
